package com.zx.jhpt.po;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * FxUserId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class FxUserId implements java.io.Serializable {

	// Fields

	private String dept;
	private String fxid;
	private String userid;

	// Constructors

	/** default constructor */
	public FxUserId() {
	}

	/** full constructor */
	public FxUserId(String dept, String fxid, String userid) {
		this.dept = dept;
		this.fxid = fxid;
		this.userid = userid;
	}

	// Property accessors

	@Column(name = "DEPT", nullable = false, length = 64)
	public String getDept() {
		return this.dept;
	}

	public void setDept(String dept) {
		this.dept = dept;
	}

	@Column(name = "FXID", nullable = false, length = 64)
	public String getFxid() {
		return this.fxid;
	}

	public void setFxid(String fxid) {
		this.fxid = fxid;
	}

	@Column(name = "USERID", nullable = false, length = 64)
	public String getUserid() {
		return this.userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FxUserId))
			return false;
		FxUserId castOther = (FxUserId) other;

		return ((this.getDept() == castOther.getDept()) || (this.getDept() != null
				&& castOther.getDept() != null && this.getDept().equals(
				castOther.getDept())))
				&& ((this.getFxid() == castOther.getFxid()) || (this.getFxid() != null
						&& castOther.getFxid() != null && this.getFxid()
						.equals(castOther.getFxid())))
				&& ((this.getUserid() == castOther.getUserid()) || (this
						.getUserid() != null && castOther.getUserid() != null && this
						.getUserid().equals(castOther.getUserid())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getDept() == null ? 0 : this.getDept().hashCode());
		result = 37 * result
				+ (getFxid() == null ? 0 : this.getFxid().hashCode());
		result = 37 * result
				+ (getUserid() == null ? 0 : this.getUserid().hashCode());
		return result;
	}

}